<template>

    <van-form @submit="onSubmit">
        <van-cell-group inset>
            <van-field v-model="username" name="username" label="用户名" placeholder="用户名"
                :rules="[{ required: true, message: '请输入手机号/用户名/邮箱' }]" />
            <van-field v-model="password" type="password" name="password" label="密码" placeholder="密码"
                :rules="[{ required: true, message: '请输入密码' }]" />
        </van-cell-group>
        <div style="margin: 16px;">
            <van-button round block type="primary" native-type="submit" :disabled="username==''||password==''" @click="kk">
                
                登录
            </van-button>
        </div>
    </van-form>
</template>
<script setup>
    import { ref , onMounted} from 'vue';
import request from '@/utils/request'
    const username=ref()
    const password=ref()
    import { useRouter ,useRoute} from "vue-router";
const router=useRouter()
const route=useRoute()
    let kk=()=>{
        router.push('/index')
    }
</script>